-- GENERATED SPELL FOR [Dispirited Ent] --


function spell0_31041(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(15981,pUnit)
pUnit:RegisterEvent('Sorts_31041', 12000, 1)
end

function spell1_31041(pUnit, Event) --@Thorns,n/a--
pUnit:FullCastSpellOnTarget(35361,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31041', 550, 1)
end

function Sorts_31041(pUnit, Event)
local choix_sorts_31041 = math.random(0, 1)
if choix_sorts_31041 == 0 then
pUnit:RegisterEvent('spell0_31041', 1, 1)
end
if choix_sorts_31041 == 1 then
pUnit:RegisterEvent('spell1_31041', 1, 1)
end
end

function mob31041_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31041', math.random(1500, 3000), 1)
end

function mob31041_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31041_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31041_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31041, 1, 'mob31041_Action')
RegisterUnitEvent(31041, 2, 'mob31041_Leave')
RegisterUnitEvent(31041, 3, 'mob31041_Kill')
RegisterUnitEvent(31041, 4, 'mob31041_Die')
